Skip to contentSkip to conversation

Using google mock

DISCUSSION Loic Dachary 2 participants 3 messages Mar 29, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

Google mock ( ) provides convenient string matchers ( http://code.google.com/p/googlemock/wiki/CheatSheet#String_Matchers ) that would be useful when writing unit tests. It is available in most distributions:

http://packages.debian.org/search?keywords=google-mock
https://launchpad.net/ubuntu/+source/google-mock
http://rpmfind.net/linux/rpm2html/search.php?query=gmock

I've never used it before. Any objection on adding it as a dependency in addition to google test ?

Cheers

Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre
#1 lore raw
Quoted 9 lines · Loic Dachary

Hi,

Google mock ( ) provides convenient string matchers ( http://code.google.com/p/googlemock/wiki/CheatSheet#String_Matchers ) that would be useful when writing unit tests. It is available in most distributions:

http://packages.debian.org/search?keywords=google-mock
https://launchpad.net/ubuntu/+source/google-mock
http://rpmfind.net/linux/rpm2html/search.php?query=gmock

I've never used it before. Any objection on adding it as a dependency in addition to google test ?

I think as long as it is in EPEL or we can get an el6 package for those builds, it should be fine.

http://ceph.com/gitbuilder.cgi

is what we need to cover.

Thanks!
sage

#2 lore raw

Hi Sage,

It's not in EPEL

for i in 3 4 a b c d e f g h i j k l m n o p q r s t u v w x y z ; do curl --silent http://dl.fedoraproject.org/pub/epel/6/SRPMS/repoview/letter_$i.group.html | grep mock ; done
<span>A mocking library for Erlang</span>
<a href="mock.html" class="inpage">mock</a> -
<span>Easy mocking of LWP packages</span>
<span>Mockery is a simple but flexible PHP mock object framework</span>
<span>Phake is a PHP mocking framework that is based on Mockito</span>
<a href="python-flexmock.html" class="inpage">python-flexmock</a> -
<span>Testing library that makes it easy to create mocks, stubs and fakes</span>
<a href="python-minimock.html" class="inpage">python-minimock</a> -
<span>The simplest possible mock library</span>
<a href="python-mock.html" class="inpage">python-mock</a> -
<span>Tiny mocking library</span>
<a href="rubygem-rspec-mocks.html" class="inpage">rubygem-rspec-mocks</a> -
<span>Rspec-2 doubles (mocks and stubs)</span>

Regarding http://ceph.com/gitbuilder.cgi I found

OK : squeeze wheezy : http://packages.debian.org/search?keywords=google-mock
OK : oneiric natty precise quantal : https://launchpad.net/ubuntu/+source/google-mock
OK : centos6 http://pkgs.org/centos-6-rhel-6/nux-dextop-x86_64/gmock-1.5.0-1.el6.nux.x86_64.rpm.html
OK : fedora17 fedora18 https://admin.fedoraproject.org/pkgdb/acls/name/gmock
OK : opensuse12 https://build.opensuse.org/package/view_file?expand=1&file=gmock.spec&package=gmock&project=GNOME%3AAyatana

not sure about : sles-11sp2 https://www.suse.com/company/press/2012/2/suse-linux-enterprise-11-service-pack-2-released.html

I'll keep looking.

Cheers

Quoted 21 lines · Sage Weil
Quoted 9 lines · Loic Dachary

Hi,

Google mock ( ) provides convenient string matchers ( http://code.google.com/p/googlemock/wiki/CheatSheet#String_Matchers ) that would be useful when writing unit tests. It is available in most distributions:

http://packages.debian.org/search?keywords=google-mock
https://launchpad.net/ubuntu/+source/google-mock
http://rpmfind.net/linux/rpm2html/search.php?query=gmock

I've never used it before. Any objection on adding it as a dependency in addition to google test ?

I think as long as it is in EPEL or we can get an el6 package for those builds, it should be fine.

http://ceph.com/gitbuilder.cgi

is what we need to cover.

Thanks!
sage

Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre